<!-- 用户管理 -->
<template>
  <div class="app-container">
    <el-row :gutter="20">
      <!-- 部门树 -->

      <!-- 用户列表 -->
      <el-col :lg="24" :xs="24">
        <div class="jiaqitop">
          <div class="titlel">
            <div class="titlel_box"></div>
            <div class="titlel_tt">系统设置</div>
          </div>
        </div>

        <!-- 搜索区域 -->

        <div class="containers">
          <div class="userbox">
            <div class="userb">
              <img src="/src/assets/images/Frame@2x(1).png" class="avatar" alt="" />
              <div class="name">山茶花读不懂白玫瑰</div>
              <img src="/src/assets/images/Frame@2x(5).png" class="bianjiicon" alt="" />
            </div>
            <el-button class="btn" color="#003779">更换头像</el-button>
          </div>
          <div class="usernamec">
            <div class="line">
              <div style="margin-left: 30px; width: 80px; font-size: 16px">账号：</div>
              <div class="number">13733709982</div>
            </div>
            <div class="line1">
              <div style="margin-left: 30px; width: 80px; font-size: 16px">登录密码：</div>
              <div class="number">*******</div>
              <el-button class="btn" color="#003779" @click="popubool = true">修改密码</el-button>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
    <el-dialog v-model="popubool" :show-close="false" width="29.125rem" :modal="false" center>
      <template #header>
        <div class="popubox">
          <div class="backtop">
            <div class="topline">
              <div class="text">修改密码</div>
              <img
                src="/src/assets/images/微信图片_20250903150026_21_215.png"
                @click="popubool = false"
                alt=""
                style="cursor: pointer"
              />
            </div>
          </div>
          <div class="bdan">
            <el-form ref="queryFormRef" :model="queryParams" :inline="true">
              <el-form-item label="旧密码:">
                <el-input placeholder="请输入旧密码" clearable />
              </el-form-item>

              <el-form-item label="新密码">
                <el-input placeholder="请输入新密码" clearable />
              </el-form-item>

              <el-form-item label="确认新密码">
                <el-input placeholder="请再次输入新密码" clearable />
              </el-form-item>
              <div class="btnss">
                <el-button @click="handleResetQuery">取消</el-button>
                <el-button type="primary" @click="handleQuery">确定</el-button>
              </div>
            </el-form>
          </div>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script setup lang="ts">
const activenum = ref(0);

const disabledDate = (time: Date) => {
  return time.getTime() > Date.now();
};
const options = [
  {
    value: "Option1",
    label: "Option1",
  },
  {
    value: "Option2",
    label: "Option2",
  },
  {
    value: "Option3",
    label: "Option3",
  },
  {
    value: "Option4",
    label: "Option4",
  },
  {
    value: "Option5",
    label: "Option5",
  },
];
const query = reactive({
  value1: "",
  value: "",
});
const queryParams = reactive({
  val: 1,
  val1: 10,
  val2: "",
});
const popubool = ref(false);

const tableData = [
  {
    id: 1,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 1,
    zh: 13933029012,
  },
  {
    id: 1,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 2,
    zh: 13933029012,
  },
  {
    id: 1,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 2,
    zh: 13933029012,
  },
  {
    id: 2,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 1,
    zh: 13933029012,
  },
  {
    id: 4,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 1,
    zh: 13933029012,
  },
  {
    id: 5,
    yijiclassname: "公共假期",
    hangye: "行业名称",
    yewuname: "业务名称",
    addtime: "2025-10-20 12:00:00",
    quanzhong: "业务名称",
    status: 1,
    zh: 13933029012,
  },
];
function tableHeaderStyle({ row, rowIndex, column, columnIndex }) {
  if (column.rowSpan == 1) {
    console.log(column);

    if (column.index == "1") {
      return { background: "#21A193", color: "#fff" };
    }

    if (column.label == "周六" || column.label == "周日")
      return { background: "#21A193", color: "#fff" };
  }
}
function tableHeaderStyle1({ row, rowIndex, column, columnIndex }) {
  console.log(rowIndex, "row-----------");
  if (rowIndex == 7) {
    return { color: "#F53F3F" };
  }
  if (rowIndex == 6) {
    return { color: "#1D2129", "font-weight": "bold" };
  }
}
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
  if (rowIndex === 6) {
    if (columnIndex === 0) {
      return [1, 3];
    } else if (columnIndex === 1) {
      return [0, 0];
    } else if (columnIndex === 2) {
      return [0, 0];
    }
  }
};
</script>
<style lang="scss" scoped>
::v-deep .el-input__wrapper {
  background: #f7f8fa;
  box-shadow: none !important;
  height: 52px;
}
.btnss {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  .el-button {
    width: 118px;
    height: 41px;
  }
}
::v-deep .el-input__inner {
  width: 90%;
  margin: auto;
  flex-grow: 0;
}
::v-deep .el-form-item--default .el-form-item__content {
  width: 25.625rem;
  height: 52px;
  background: #f7f8fa;
  box-shadow: none !important;
  border-radius: 6px 6px 6px 6px;
}
::v-deep .el-select--large .el-select__wrapper {
  width: 39.5rem;
  background: #f7f8fa;
  border-radius: 6px 6px 6px 6px;
  border: none !important;
  box-shadow: none !important;
}

::v-deep .el-dialog--center {
  padding: 0 !important;
}
::v-deep .el-dialog__header {
  border: none !important;
  padding: 0 !important;
}

.popubox {
  width: 100%;
  overflow: hidden;
  .bdan {
    width: 26.625rem;
    margin: auto;
    margin-top: 19px;
    ::v-deep .el-form-item {
      display: block;
    }
    ::v-deep .el-radio__input.is-checked .el-radio__inner {
      background: #ffffff !important;
    }
    ::v-deep .el-radio__input.is-checked .el-radio__inner::after {
      background: #003779 !important;
      width: 8px;
      height: 8px;
    }
    ::v-deep .el-form-item__label {
      height: 32px;
      width: 100%;
      line-height: 32px;
      display: block;
      text-align: left !important;
      margin-bottom: 16px;
    }
  }
  .qdbtn {
    width: 113px;
    height: 44px;
    background: #003779;
    border-radius: 6px 6px 6px 6px;
    text-align: center;
    line-height: 44px;
    font-family:
      PingFang SC,
      PingFang SC;
    font-weight: 400;
    font-size: 15px;
    color: #ffffff;
    margin-left: 789px;
    margin-top: 24px;
  }
  .xzbox {
    width: 87.5rem;
    margin: auto;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .el-select {
      width: 18.6875rem;
      border-radius: 6px 6px 6px 6px;
      display: flex;
      font-size: 1rem;
      align-items: center;
    }
    .daochubtn {
      width: 7.0625rem;
      height: 2.75rem;
      border: 1px solid #4e5969;
      border-radius: 4px 4px 4px 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.9375rem;
      color: #4e5969;
      img {
        width: 1rem;
        height: 1rem;
      }
    }
  }
  .titleboxs {
    width: 87.5rem;
    margin: auto;
    margin-top: 16px;
    height: 60px;
    background: #edf1fc;
    border-radius: 8px 8px 8px 8px;
    display: flex;
    align-items: center;

    .yijibt {
      margin-left: 24px;
      font-family:
        PingFang SC,
        PingFang SC;
      font-weight: bold;
      font-size: 1.125rem;
      color: #003779;
    }
    .fgx {
      width: 1px;
      height: 2.75rem;
      border-radius: 0px 0px 0px 0px;
      background: rgba(0, 55, 121, 0.5);
      margin-left: 4.625rem;
    }
    .erjibt {
      font-family:
        PingFang SC,
        PingFang SC;
      font-weight: bold;
      font-size: 1.125rem;
      color: #003779;
      margin-left: 44px;
    }
  }
  .backtop {
    width: 100%;
    height: 54px;
    background: #e5e6eb;
    display: flex;
    align-items: center;
    .topline {
      width: 26.625rem;
      margin: auto;
      display: flex;
      justify-content: space-between;
      .text {
        font-family:
          PingFang SC,
          PingFang SC;
        font-weight: bold;
        font-size: 18px;
        color: #4e5969;
      }
      img {
        width: 24px;
        height: 24px;
      }
    }
  }
}

.msgbox {
  width: 574px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family:
    PingFang SC,
    PingFang SC;
  font-weight: 400;
  font-size: 20px;
  margin: 45px auto;
  color: #003779;
}
.msgbox img {
  width: 574px;
  height: 452px;
  margin-bottom: 50px;
}
.jiaqitop {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .addtj {
    width: 7rem;
    height: 2.75rem;
    // background: #003779;
    border-radius: 6px 6px 6px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family:
      PingFang SC,
      PingFang SC;
    font-weight: 400;
    font-size: 0.9375rem;
    color: #ffffff;
    img {
      width: 0.5625rem;
      height: 0.5625rem;
    }
  }
  .titlel {
    display: flex;
    align-items: center;
    .titlel_box {
      width: 4px;
      height: 23px;
      background: #003779;
      border-radius: 0px 6px 6px 0px;
    }
    .titlel_tt {
      font-family:
        PingFang SC,
        PingFang SC;
      font-weight: bold;
      font-size: 1.375rem;
      color: #1d2129;
      margin-left: 9px;
    }
  }
}

.containers {
  width: 100%;
  background: #ffffff;
  min-height: 915px;
  overflow: hidden;
  border-radius: 16px 16px 16px 16px;
  margin-top: 24px;
  padding: 0 1.5rem;
  overflow: hidden;
  .usernamec {
    width: 78.375rem;
    margin-top: 34px;
    overflow: hidden;
    .line {
      width: 100%;
      height: 70px;
      display: flex;
      background: #f7f8fa;
      border-top: 1px solid #e5e6eb;
      border-bottom: 1px solid #e5e6eb;
      align-items: center;
      .number {
        margin-left: 13.9375rem;
        font-family:
          PingFang SC,
          PingFang SC;
        font-weight: 400;
        font-size: 16px;
        color: #1d2129;
      }
    }
    .line1 {
      width: 100%;
      height: 70px;
      display: flex;
      border-bottom: 1px solid #e5e6eb;
      align-items: center;
      position: relative;

      .btn {
        width: 114px;
        height: 40px;
        border-radius: 4px 4px 4px 4px;
        position: absolute;
        right: 28px;
      }
      .number {
        margin-left: 13.9375rem;
        font-family:
          PingFang SC,
          PingFang SC;
        font-weight: 400;
        font-size: 16px;
        color: #1d2129;
      }
    }
  }
  .userbox {
    width: 78.375rem;
    height: 110px;
    background: #edf1fc;
    border-radius: 14px 14px 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 34px;
    .btn {
      width: 114px;
      height: 40px;
      margin-right: 28px;
    }
    .userb {
      display: flex;
      align-items: center;
      margin-left: 34px;
      .avatar {
        width: 58px;
        height: 58px;
      }
      .name {
        font-family:
          PingFang SC,
          PingFang SC;
        font-weight: 400;
        font-size: 16px;
        color: #1d2129;
        margin-left: 12px;
      }
      .bianjiicon {
        width: 22px;
        height: 22px;
      }
    }
  }
}
</style>
